package com.base.web.core.exception;


import com.base.web.core.enums.ResultEmun;

/**
 * Created with IntelliJ IDEA.
 * Description: 自定义异常，添加业务所需字段
 *
 * @Author: rentie
 * @Date: 2018/7/16 14:43
 */
public class BaseException extends RuntimeException {

    /**
     * 错误代码
     */
    private String code;

    public BaseException(ResultEmun resultEmun) {
        super(resultEmun.getMessage());
        this.code = resultEmun.getCode();
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}